/**
 * ReportGear(2011)
 */
package com.reportgear.designer.view.menu;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import net.abbp.report.designer.action.file.PrintReportAction;
import net.abbp.report.designer.action.file.SaveReportAction;

import com.reportgear.designer.action.edit.MergeCellAction;
import com.reportgear.designer.action.edit.UnmergeCellAction;
import com.reportgear.designer.action.file.DeleteReportAction;
import com.reportgear.designer.action.file.NewReportAction;
import com.reportgear.designer.action.file.PagePreviewAction;
import com.reportgear.designer.action.file.PageSetupAction;
import com.reportgear.designer.action.report.ReportFooterAction;
import com.reportgear.designer.action.report.ReportHeaderAction;
import com.reportgear.designer.action.report.ReportParametersAction;
import com.reportgear.designer.action.style.GlobalStyleAction;

/**
 * 设计器菜单
 * 
 * @version 1.0 2011-4-23
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since Report 1.0
 */
public class DesignerMenu extends JMenuBar {
	public DesignerMenu() {
		JMenu fileMenu = new JMenu("文件");
		fileMenu.add(new JMenuItem(new NewReportAction()));
		fileMenu.add(new JMenuItem(new SaveReportAction()));
		fileMenu.add(new JMenuItem(new DeleteReportAction()));
		fileMenu.addSeparator();
		fileMenu.add(new JMenuItem(new PagePreviewAction()));
		fileMenu.add(new JMenuItem(new PrintReportAction()));
		fileMenu.add(new JMenuItem(new PageSetupAction()));
		this.add(fileMenu);

		JMenu StyleMenu = new JMenu("样式");
		StyleMenu.add(new JMenuItem(new MergeCellAction()));
		StyleMenu.add(new JMenuItem(new UnmergeCellAction()));
		StyleMenu.addSeparator();
		StyleMenu.add(new JMenuItem(new GlobalStyleAction()));
		this.add(StyleMenu);

		JMenu ReportMenu = new JMenu("报表");
		ReportMenu.add(new JMenuItem(new ReportHeaderAction()));
		ReportMenu.add(new JMenuItem(new ReportFooterAction()));
//		ReportMenu.add(new JMenuItem(new ReportParametersAction()));
		this.add(ReportMenu);
	}
}
